/*
 * Name: Joon Ho Cho
 * Date: 10/24/2008
 * Course: 15-437
 */
package scheduler.formbean;

import java.util.ArrayList;
import java.util.List;

public class ChangeCommentForm {
    String idString = null;
	private String newComment = "";
	
    public String getIdString() {
        return idString;
    }

    public void setIdString(String idString) {
        this.idString = idString;
    }
    
    public int getId() {
        try {
            return Integer.parseInt(idString);
        } catch (NumberFormatException e) {
            return 0;
        }
    }
	
    public String getNewComment() {
        return newComment;
    }

    public void setNewComment(String newComment) {
        this.newComment = newComment;
    }

    public List<String> getValidationErrors() {
		return new ArrayList<String>();
	}
	
	public boolean isPresent() {
		return (getId()!= 0);
	}
}
